package com.ddwl.common.feign.api;

import com.ddwl.schema.bo.data.OperateLogVo;
import com.ddwl.schema.bo.user.UserSearchBo;
import com.ddwl.schema.vo.base.RestVo;
import com.ddwl.schema.vo.data.DataTodayVo;
import com.ddwl.schema.vo.order.StatisticsUserVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 类DataApi.java的实现描述：TODO
 *
 * @author zach
 * @Date :2020-10-12 17:50.
 */
@FeignClient(name = "ddwl-data" ,path = "/data")
public interface DataApi {

    @GetMapping("/today")
    RestVo<DataTodayVo> today();

    /**
     *获取修改邀请码记录
     * @param userId
     * @return
     */
    @PostMapping("/operateLog/queryUpdateInviteCode")
    RestVo<OperateLogVo> queryUpdateInviteCode(@RequestParam String userId);

    /**
     * 获取操作日志数量
     * @param code
     * @param key
     * @param method
     * @return
     */
    @GetMapping("/operateLog/countOperateLog")
    RestVo<Integer> countOperateLog(@RequestParam Integer code,@RequestParam String key, @RequestParam String method);

    /**
     * 活跃用户数量
     * @param bo
     * @return
     */
    @PostMapping("/operateLog/activeUserCount")
    RestVo<List<StatisticsUserVo>> activeUserCount(@RequestBody UserSearchBo bo);

}
